prepare("select * from invent_details where invent_id = '$id'") ; $getd->execute() ; //get tsum $gsum = $DBcon->prepare("select sum(total_cost) as tcost from invent_details where invent_id = '$id'") ; $gsum->execute() ; $grow = $gsum->fetch(pdo::FETCH_ASSOC) ; $tsum = $grow['tcost'] ; if(isset($_POST['search'])) { //$date1 = trim($_POST['date1']) ; //$date2 = trim($_POST['date2']) ; } ?> Inventory Details

INVENT DETAILS

INVENT DETAILS" ; ?> Inventory Date :
fetch(pdo::FETCH_ASSOC)) { $count++ ; ?>
SN CATEGORY ITEMS MEASURE QUANTITY UNIT-COST TOTAL-COST
          Grand Total